Skip to content

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Nov 20, 2025

No description provided.

@camc314 camc314 force-pushed the c/11-20-feat_linter_expose_type_errors_via_tsgolint branch from b465dae to 31065ed Compare November 20, 2025 15:25
@camc314 camc314 marked this pull request as ready for review November 20, 2025 15:25
Copy link
Contributor Author

camc314 commented Nov 20, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI labels Nov 20, 2025
@github-actions github-actions bot added the C-enhancement Category - New feature or request label Nov 20, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 20, 2025

CodSpeed Performance Report

Merging #15917 will not alter performance

Comparing c/11-20-feat_linter_expose_type_errors_via_tsgolint (a33bb37) with main (a21f9e4)1

Summary

✅ 4 untouched
⏩ 41 skipped2

Footnotes

  1. No successful run was found on main (152e5de) during the generation of this report, so a21f9e4 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 41 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@graphite-app graphite-app bot force-pushed the c/11-20-feat_linter_type-aware_include_range_with_tsconfig_diagnostics branch 2 times, most recently from 3fc93d5 to d29da4c Compare November 20, 2025 15:54
@graphite-app graphite-app bot force-pushed the c/11-20-feat_linter_expose_type_errors_via_tsgolint branch from 31065ed to 0682abe Compare November 20, 2025 15:54
@camc314 camc314 changed the base branch from c/11-20-feat_linter_type-aware_include_range_with_tsconfig_diagnostics to graphite-base/15917 November 20, 2025 18:53
@camc314 camc314 force-pushed the c/11-20-feat_linter_expose_type_errors_via_tsgolint branch from 0682abe to fba7c08 Compare November 20, 2025 18:53
@camc314 camc314 force-pushed the graphite-base/15917 branch from d29da4c to 2666cdd Compare November 20, 2025 18:53
@camc314 camc314 changed the base branch from graphite-base/15917 to renovate/oxlint November 20, 2025 18:53
@camc314 camc314 changed the base branch from renovate/oxlint to graphite-base/15917 November 20, 2025 18:55
@camc314 camc314 force-pushed the c/11-20-feat_linter_expose_type_errors_via_tsgolint branch from fba7c08 to 91aed72 Compare November 20, 2025 18:55
@camc314 camc314 changed the base branch from graphite-base/15917 to c/11-20-feat_linter_type-aware_include_range_with_tsconfig_diagnostics November 20, 2025 18:55
@graphite-app graphite-app bot force-pushed the c/11-20-feat_linter_type-aware_include_range_with_tsconfig_diagnostics branch 2 times, most recently from 05650c0 to bacd607 Compare November 20, 2025 19:04
@graphite-app graphite-app bot force-pushed the c/11-20-feat_linter_expose_type_errors_via_tsgolint branch from 91aed72 to 7436957 Compare November 20, 2025 19:04
@camc314 camc314 force-pushed the c/11-20-feat_linter_expose_type_errors_via_tsgolint branch 2 times, most recently from ea41ae8 to 923c900 Compare November 20, 2025 20:25
@graphite-app graphite-app bot changed the base branch from c/11-20-feat_linter_type-aware_include_range_with_tsconfig_diagnostics to graphite-base/15917 November 20, 2025 20:28
@graphite-app graphite-app bot force-pushed the c/11-20-feat_linter_expose_type_errors_via_tsgolint branch from 923c900 to a0a0c04 Compare November 20, 2025 20:33
@graphite-app graphite-app bot force-pushed the graphite-base/15917 branch from bacd607 to 4b9d8d2 Compare November 20, 2025 20:33
@graphite-app graphite-app bot changed the base branch from graphite-base/15917 to main November 20, 2025 20:34
@graphite-app graphite-app bot force-pushed the c/11-20-feat_linter_expose_type_errors_via_tsgolint branch from a0a0c04 to ee6a528 Compare November 20, 2025 20:34
@camc314 camc314 force-pushed the c/11-20-feat_linter_expose_type_errors_via_tsgolint branch from ee6a528 to 137e700 Compare November 21, 2025 15:08
Copilot AI review requested due to automatic review settings November 21, 2025 15:08
@camc314 camc314 force-pushed the c/11-20-feat_linter_expose_type_errors_via_tsgolint branch 3 times, most recently from 96dd1b0 to 87d27dd Compare November 21, 2025 15:10
@camc314 camc314 force-pushed the c/11-20-feat_linter_expose_type_errors_via_tsgolint branch from 87d27dd to a33bb37 Compare November 21, 2025 15:10
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Nov 21, 2025
@camc314 camc314 self-assigned this Nov 21, 2025
Copilot finished reviewing on behalf of camc314 November 21, 2025 15:11
Copy link
Contributor Author

camc314 commented Nov 21, 2025

Merge activity

  • Nov 21, 3:11 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new --type-check CLI flag to expose TypeScript compiler syntactic and semantic diagnostics via the tsgolint integration. This allows users to catch TypeScript type errors alongside linting issues when using type-aware linting.

  • Adds experimental_type_check field throughout the linting pipeline (TsGoLintState, LintRunnerBuilder)
  • Exposes new report_syntactic and report_semantic fields in the tsgolint JSON payload to control TypeScript compiler diagnostics
  • Updates CLI help documentation snapshots to reflect the new flag

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tasks/website/src/linter/snapshots/cli_terminal.snap Updates terminal help text to include --type-check flag documentation
tasks/website/src/linter/snapshots/cli.snap Updates markdown help text to include --type-check flag documentation
crates/oxc_linter/src/tsgolint.rs Adds experimental_type_check field to TsGoLintState and exposes report_syntactic/report_semantic in JSON payload
crates/oxc_linter/src/lint_runner.rs Adds experimental_type_check to LintRunnerBuilder and propagates it to TsGoLintState
apps/oxlint/src/lint.rs Integrates the new flag by calling with_experimental_type_check() on LintRunnerBuilder and adds test case
apps/oxlint/src/command/lint.rs Defines the --type-check CLI switch and adds unit test for the option
apps/oxlint/fixtures/tsgolint_type_error/tsconfig.json Test fixture TypeScript configuration
apps/oxlint/fixtures/tsgolint_type_error/index.ts Test fixture with intentional type error (string assigned to number)
apps/oxlint/fixtures/tsgolint_type_error/index.js Test fixture JavaScript output
apps/oxlint/fixtures/tsgolint_type_error/.oxlintrc.json Test fixture linter configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

#[bpaf(switch, hide_usage)]
pub type_aware: bool,

/// Enable experimental type checking (includes TypeScript compiler diagnostics)
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description for --type-check should mention that it requires --type-aware to be enabled. Currently, if a user passes --type-check without --type-aware, the flag is silently ignored because TsGoLintState is only created when type_aware_enabled is true (see lint_runner.rs lines 176-191).

Consider updating the description to: "Enable experimental type checking (includes TypeScript compiler diagnostics). Requires --type-aware"

Suggested change
/// Enable experimental type checking (includes TypeScript compiler diagnostics)
/// Enable experimental type checking (includes TypeScript compiler diagnostics). Requires --type-aware

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0-merge Merge with Graphite Merge Queue A-cli Area - CLI A-linter Area - Linter C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants